package com.macro.mall.portal.service.impl;


import com.macro.mall.mapper.PmsProductCommentServiceMapper;

import com.macro.mall.model.PmsProductComment;
import com.macro.mall.portal.service.PmsProductCommentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class PmsProductCommentServiceImpl implements PmsProductCommentService {
    @Autowired
    private PmsProductCommentServiceMapper mapper;
    //根据skuID查询 评论数量
    @Override
    public Long commentCount(Long id) {
        Long  count = mapper.commentCount(id);
        return count;
    }
    //商品 评级星级
    @Override
    public Long skuProductLevel(Long id,Integer uid) {
        Long  count = mapper.skuProductLevel(id,uid);
        return count;
    }
    //商品 评论内容 评论时间 评论人
    @Override
    public List<PmsProductComment> PmsProductCommentList(Long id,Integer uid) {
        List<PmsProductComment> list = mapper.PmsProductCommentList(id,uid);
        return list;
    }
}
